﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;

namespace MedicalSystem.SamrtReport
{
    partial class AboutBox : Form
    {
        public AboutBox()
        {
            InitializeComponent();

            
        }


        private void AboutBox_Click(object sender, EventArgs e)
        {
            Timer timer = new Timer();
            timer.Interval = 25;
            timer.Tick += delegate
            {
                if (this.Opacity != 0)
                {
                    this.Opacity = this.Opacity - 0.1;
                }
                else
                {
                    timer.Stop();
                    timer.Dispose();
                    this.DialogResult = DialogResult.Cancel;
                }
            };
            timer.Start();
        }

        private void AboutBox_Load(object sender, EventArgs e)
        {
            this.Opacity = 0;
            Timer timer = new Timer();
            timer.Interval = 25;
            timer.Tick += delegate
            {
                if (this.Opacity != 1)
                {
                    this.Opacity = this.Opacity + 0.1;
                }
                else
                {
                    timer.Stop();
                    timer.Dispose();

                }
            };
            timer.Start();
        }
    }
}
